package face.pay.task.terminal;

import face.pay.task.terminal.service.ITerminalTargetAllCountRelationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @Classname TerminalTargetOnCountTask
 * @Description JJL
 * @Date 2019/10/24 13:44
 */
@Component
public class TerminalTargetAllCountTask {
    @Autowired
    private ITerminalTargetAllCountRelationService targetAllCountService;

    /**
     * 将上一天记录添加到 terminal_target_on_count表中做统计
     */
    @Scheduled(cron = "0 0 2/24 * * ?")
    @Async
    public void orderAllCountCheck(){
        try {
            targetAllCountService.terminalTargetAllCountTask();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}
